package org.example.blogpojo.blog.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * Tb Article Type表
 * @TableName tb_article_type
 */
@Data
public class ArticleType implements Serializable {

    private static final long serialVersionUID = 1L;
    @Schema (description = "类型ID")
    private Long id;

    @Schema (description = "类型名称")
    private String typeName;

    @Schema (description = "类型状态")
    private Integer status;

    @Schema (description = "类型创建时间")
    private Date createTime=new Date();

    @Schema (description = "类型修改时间")
    private Date updateTime=new Date();

    @Schema (description = "父类型id")
    private Long parentId;

    @Schema (description = "父类型")
    private ArticleType parent;

    @Schema (description = "子类集合")
    @JsonInclude (JsonInclude.Include.NON_EMPTY) //不显示空值!!!
    private List<ArticleType> children =new ArrayList<ArticleType>();
}